<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns:th="http://www.thymeleaf.org"> 

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
		<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.">
		<link rel="stylesheet" href="lib/weui.min.css">
		<link rel="stylesheet" href="css/jquery-weui.css">
		<link rel="stylesheet" href="css/style.css">
	</head>
<script>
	$(function () {
        $("#sss").click(function () {
			var orderid=$("#orderid").val();
			window.location.href="GetAllAddress.htm?orderid="+orderid;
        });
    })
</script>
	<body ontouchstart>
		<!--订单详情-->
		<header class="wy-header">
			<div class="wy-header-icon-back" onclick="back();"><span></span></div>
			<div class="wy-header-title">订单详情</div>
		</header>
		<!--订单结束-->

		<!-- 主体 开始-->
		<div class="weui-content">
			<!-- 地址管理 开始-->
			<div class="wy-media-box weui-media-box_text address-select">
				<div class="weui-media-box_appmsg">
					<div class="weui-media-box__hd proinfo-txt-l" style="width:20px;"><span class="promotion-label-tit"><img src="images/icon_nav_city.png"  /></span></div>
					<div class="weui-media-box__bd" id="sss">
						<!--点击跳转到地址管理页面-->
						<a  class="weui-cell_access" th:if="${address!=null}">
							<!---->
							<h4 class="address-name"><span th:text="${address.consignee}"></span>   <span th:text="${address.phone}"></span></h4>
							<div class="address-txt" th:text="${address.address}" name="address_def"></div>
						</a>
                        <a href="" class="weui-cell_access" th:if="${address==null}">
                            <!--如果收货地址为空-->
                           <a href="Address.htm">请添加收货地址！</a>
                        </a>
						<input type="hidden" th:value="${orderId}" id="orderid"/>
					</div>
					<div class="weui-media-box__hd proinfo-txt-l" style="width:16px;">
						<div class="weui-cell_access" onclick="EditAddress()"><span class="weui-cell__ft"></span></div>
					</div>
				</div>
			</div>
			<!-- 地址管理 结束-->
			<!-- 商品信息开始 -->
			<div class="wy-media-box weui-media-box_text">
                <span>商品信息开始</span>
               <!-- <span style="display: none" th:text="${listt.orderId}"></span>-->
				<div class="weui-media-box__bd" th:each="listt:${list}" >
					<div class="weui-media-box_appmsg ord-pro-list" th:each="lstgoods:${listt.goods}">
						<div class="weui-media-box__hd" th:each="lisimg1:${lstgoods.images}">
							<!-- 点击跳转到订单信息页面 -->
							<a href="pro_info.html"><img class="weui-media-box__thumb" th:src="${lisimg1.path}" alt=""></a>
						</div>
						<div class="weui-media-box__bd">
							<!-- 点击跳转到订单信息页面 -->
							<h1 class="weui-media-box__desc"><a href="pro_info.html" class="ord-pro-link" th:text="${lstgoods.goodsName}"></a></h1>
							<p class="weui-media-box__desc">规格：<span th:text="${listt.models}"></span></p>
							<div class="clear mg-t-10">
								<div class="wy-pro-pri fl">¥<em class="num font-15" th:text="${lstgoods.price}"></em></div>
								<div class="pro-amount fr">
									<!--<div id="spinner-amount" class="Spinner"></div>-->
                                    <span th:text="${listt.orderNum}"></span>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- 商品信息结束-->
			<!-- 配送放肆，运费详情，可用积分，优惠券开始 -->
			<div class="weui-panel">
				<div class="weui-panel__bd">
					<div class="weui-media-box weui-media-box_small-appmsg">
						<div class="weui-cells">
							<!-- 配送方式开始-->
							<div class="weui-cell weui-cell_access">
								<div class="weui-cell__bd weui-cell_primary">
									<p class="font-14"><span class="mg-r-10">配送方式</span><span class="fr">快递</span></p>
								</div>
							</div>
							<!-- 配送方式结束-->
							<!-- 运费开始-->
							<div class="weui-cell weui-cell_access" href="javascript:;">
								<div class="weui-cell__bd weui-cell_primary">
									<p class="font-14"><span class="mg-r-10">运费</span><span class="fr txt-color-red"><em class="num">商家包邮</em></span></p>
								</div>
							</div>
							<!-- 运费结束-->
							<!-- 积分开始-->
							<a class="weui-cell weui-cell_access" href="#">
								<div class="weui-cell__bd weui-cell_primary">
									<p class="font-14"><span class="mg-r-10">可用积分</span><span class="sitem-tip"><em class="num">0</em>个</span></p>
								</div>
								<span class="weui-cell__ft"></span>
							</a>
							<!-- 积分开始-->
							<!-- 优惠券开始-->
							<a class="weui-cell weui-cell_access" href="#">
								<div class="weui-cell__bd weui-cell_primary">
									<p class="font-14"><span class="mg-r-10">优惠券</span><span class="sitem-tip"><em class="num">0</em>张可用</span></p>
								</div>
								<span class="weui-cell__ft"></span>
							</a>
							<!-- 优惠券结束-->
						</div>
					</div>
				</div>
			</div>
			<!-- 配送放肆，运费详情，可用积分，优惠券结束 -->
			<!--总金额和支付开始-->
			<div class="wy-media-box weui-media-box_text">
				<div class="mg10-0 t-c">总金额：<span class="wy-pro-pri mg-tb-5">¥<em class="num font-20" th:text="${Allprice}"></em></span></div>
				<div class="mg10-0">
					<!--<a href="#" class="weui-btn weui-btn_primary">货到付款</a>-->
                    <form action="pay_true.htm" method="post" style="display: none" id="pay">
                        <input type="hidden" th:value="${orderId}" id="orderid" name="orderId"/>
                        <input type="hidden" th:value="${Allprice}" id="allprice" name="Allprice"/>
						<div th:if="${address!=null}">
							<input type="hidden" th:value="${address.address}" id="address" name="address"/>
						</div>
                    </form>

					<a href="javascript:zhuanfa();" class="weui-btn weui-btn_primary">在线支付</a>
				</div>
			</div>
			<!--总金额和支付结束-->
		</div>
		<!-- 主体结束-->
	</body>
	<script src="lib/jquery-2.1.4.js"></script>
	<script src="lib/fastclick.js"></script>
	<script type="text/javascript" src="js/jquery.Spinner.js"></script>

	<script>
		$(function() {
			FastClick.attach(document.body);
		});
	</script>
	<script type="text/javascript">
        function zhuanfa() {
            $("#pay").submit();
        }
		$(function() {
			$(".Spinner").Spinner({
				value: 1,
				len: 3,
				max: 999
			});
		});
        
        function EditAddress() {
			window.location.href="GetAllAddress.htm";
        }
        function back() {
            history.back();
        }
	</script>
	<script src="js/jquery-weui.js"></script>
</html>